#include "Generate_C_std.h"

/*
 * Foreach patterns
 */

class Pattern_foreach_reset : public Pattern
{
	bool match (Statement* that)
	{
		reset = new Wildcard<Foreach_reset>;
		return that->match (reset);
	}

	void generate_code(Generate_C* gen)
	{
		INST (buf, "foreach_reset",
			reset->value->array, reset->value->iter->value);
	}

protected:
	Wildcard<Foreach_reset>* reset;
};

CREATE(Pattern_foreach_reset);
